namespace hjc {

	export abstract class Mediator implements IMediator {

		protected $view: egret.DisplayObject;
		public get view(): egret.DisplayObject { return this.$view; }
		public set view(view: egret.DisplayObject) { this.$view = view; }
		constructor(view?: View) {
			this.$view = view;
			this.init();
			this.listen();
			this.notice();
		}
		protected init(): void { }
		protected listen(): void { }
		protected notice(): void { }
		protected lazyOn(type: string, notified: Function, observer?: any): void {
			game.on(type, notified, observer, this.view);
		}
	}

}
